{ //=========Macro generated from canvas: c1/Efficiencies //========= (Sat Mar 28 21:21:15 2009) by ROOT version5.22/00 TCanvas *c1 = new TCanvas("c1", "Efficiencies",0,44,600,600); gStyle->SetOptStat(0); c1->Range(-1.375,-13.75,2.375,123.75); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TH1 *frameP = new TH2F("frameP","",2,-1,2,220,0,1.1); frameP->SetStats(0); frameP->GetXaxis()->SetTitle("log_{10}p(GeV)"); frameP->GetYaxis()->SetTitle("Efficiency"); frameP->GetYaxis()->SetNdivisions(520); frameP->GetYaxis()->SetTitleOffset(1.2); frameP->Draw(""); TGraphAsymmErrors *grae = new TGraphAsymmErrors(15); grae->SetName(""); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); grae->SetMarkerSize(0.7); grae->SetPoint(0,-0.9,0); grae->SetPointError(0,0.1,0.1,0,0.0787842); grae->SetPoint(1,-0.7,0.6386555); grae->SetPointError(1,0.1,0.1,0.04447944,0.04294642); grae->SetPoint(2,-0.5,0.8280872); grae->SetPointError(2,0.1,0.1,0.01907668,0.01801952); grae->SetPoint(3,-0.3,0.9440299); grae->SetPointError(3,0.1,0.1,0.01050075,0.009393705); grae->SetPoint(4,-0.1,0.9756098); grae->SetPointError(4,0.1,0.1,0.007036135,0.005921997); grae->SetPoint(5,0.1,0.9984871); grae->SetPointError(5,0.1,0.1,0.002263685,0.00110631); grae->SetPoint(6,0.3,0.9984756); grae->SetPointError(6,0.1,0.1,0.002280873,0.001114734); grae->SetPoint(7,0.5,1); grae->SetPointError(7,0.1,0.1,0.001833546,0); grae->SetPoint(8,0.7,0.9979633); grae->SetPointError(8,0.1,0.1,0.00304351,0.001488817); grae->SetPoint(9,0.9,1); grae->SetPointError(9,0.1,0.1,0.003067088,0); grae->SetPoint(10,1.1,1); grae->SetPointError(10,0.1,0.1,0.004755683,0); grae->SetPoint(11,1.3,1); grae->SetPointError(11,0.1,0.1,0.0087984,0); grae->SetPoint(12,1.5,1); grae->SetPointError(12,0.1,0.1,0.01725625,0); grae->SetPoint(13,1.7,1); grae->SetPointError(13,0.1,0.1,0.06183102,0); grae->SetPoint(14,1.9,1); grae->SetPointError(14,0.1,0.1,0.3181538,0); grae->SetMarkerColor(2); grae->SetLineColor(2); grae->Draw("p"); grae1 = new TGraphAsymmErrors(15); grae1->SetName(""); grae1->SetTitle(""); grae1->SetFillColor(1); grae1->SetLineWidth(2); grae1->SetMarkerStyle(20); grae1->SetMarkerSize(0.7); grae1->SetPoint(0,-0.9,0.05755396); grae1->SetPointError(0,0.1,0.1,0.01772194,0.02198521); grae1->SetPoint(1,-0.7,0.302583); grae1->SetPointError(1,0.1,0.1,0.02734563,0.02831217); grae1->SetPoint(2,-0.5,0.7735369); grae1->SetPointError(2,0.1,0.1,0.02154561,0.02062); grae1->SetPoint(3,-0.3,0.9339623); grae1->SetPointError(3,0.1,0.1,0.01134845,0.01025511); grae1->SetPoint(4,-0.1,0.956229); grae1->SetPointError(4,0.1,0.1,0.008930596,0.007902966); grae1->SetPoint(5,0.1,0.9837518); grae1->SetPointError(5,0.1,0.1,0.005384068,0.004419797); grae1->SetPoint(6,0.3,0.9807976); grae1->SetPointError(6,0.1,0.1,0.005790834,0.004834521); grae1->SetPoint(7,0.5,0.9921997); grae1->SetPointError(7,0.1,0.1,0.004074668,0.003021181); grae1->SetPoint(8,0.7,0.9849341); grae1->SetPointError(8,0.1,0.1,0.005969261,0.0047315); grae1->SetPoint(9,0.9,0.9800499); grae1->SetPointError(9,0.1,0.1,0.007871734,0.006251437); grae1->SetPoint(10,1.1,1); grae1->SetPointError(10,0.1,0.1,0.005232171,0); grae1->SetPoint(11,1.3,0.9777778); grae1->SetPointError(11,0.1,0.1,0.01549005,0.01059998); grae1->SetPoint(12,1.5,1); grae1->SetPointError(12,0.1,0.1,0.02105035,0); grae1->SetPoint(13,1.7,1); grae1->SetPointError(13,0.1,0.1,0.06183102,0); grae1->SetPoint(14,1.9,1); grae1->SetPointError(14,0.1,0.1,0.1742602,0); grae1->SetMarkerColor(4); grae1->SetLineColor(4); // grae1->Draw("p"); grae2 = new TGraphAsymmErrors(15); grae2->SetName(""); grae2->SetTitle(""); grae2->SetFillColor(1); grae2->SetLineWidth(2); grae2->SetLineColor(4); grae2->SetMarkerStyle(20); grae2->SetMarkerSize(0.7); grae2->SetName(""); grae2->SetTitle(""); grae2->SetFillColor(2); grae2->SetLineWidth(2); grae2->SetMarkerStyle(20); grae2->SetMarkerSize(0.7); grae2->SetPoint(0,-0.9,0); grae2->SetPointError(0,0.1,0.1,0,0.06928609); grae2->SetPoint(1,-0.7,0.5431034); grae2->SetPointError(1,0.1,0.1,0.04613184,0.04564333); grae2->SetPoint(2,-0.5,0.8467967); grae2->SetPointError(2,0.1,0.1,0.01963357,0.01834828); grae2->SetPoint(3,-0.3,0.9533074); grae2->SetPointError(3,0.1,0.1,0.009920924,0.008741064); grae2->SetPoint(4,-0.1,0.9722704); grae2->SetPointError(4,0.1,0.1,0.007421387,0.00632232); grae2->SetPoint(5,0.1,1); grae2->SetPointError(5,0.1,0.1,0.001749768,0); grae2->SetPoint(6,0.3,1); grae2->SetPointError(6,0.1,0.1,0.00174181,0); grae2->SetPoint(7,0.5,1); grae2->SetPointError(7,0.1,0.1,0.001819031,0); grae2->SetPoint(8,0.7,1); grae2->SetPointError(8,0.1,0.1,0.002228297,0); grae2->SetPoint(9,0.9,1); grae2->SetPointError(9,0.1,0.1,0.003010822,0); grae2->SetPoint(10,1.1,0.9953704); grae2->SetPointError(10,0.1,0.1,0.006874291,0.00337829); grae2->SetPoint(11,1.3,1); grae2->SetPointError(11,0.1,0.1,0.008866302,0); grae2->SetPoint(12,1.5,1); grae2->SetPointError(12,0.1,0.1,0.02185107,0); grae2->SetPoint(13,1.7,1); grae2->SetPointError(13,0.1,0.1,0.06183102,0); grae2->SetPoint(14,1.9,1); grae2->SetPointError(14,0.1,0.1,0.1742602,0); grae2->SetMarkerColor(4); grae2->Draw("p"); TLegend *leg = new TLegend(0.35,0.25,0.85,0.4,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(42); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); TLegendEntry *entry=leg->AddEntry("effyP","No Background","elp"); entry->SetLineColor(2); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(2); entry->SetMarkerStyle(24); entry->SetMarkerSize(1.); TLegendEntry *entry=leg->AddEntry("effyP","With Background","pel"); entry->SetLineColor(4); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(4); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.); // entry=leg->AddEntry("effyPTPC","TPC only","p"); // entry->SetLineColor(4); // entry->SetLineStyle(1); // entry->SetLineWidth(1); // entry->SetMarkerColor(4); // entry->SetMarkerStyle(21); // entry->SetMarkerSize(1.3); float x[2] = {-1,2}; float y[2] = {1.0,1.0}; TPolyLine* line = new TPolyLine(2,x,y); line->SetLineWidth(1); line->SetLineStyle(3); line->Draw(); TLatex * tex = new TLatex(-0.9,1.01,"b)"); tex->SetTextSize(0.05); tex->SetLineWidth(2); tex->Draw(); TLatex * tex = new TLatex(-0.5,0.4,"p_{T}>1GeV; n_{VTX}+n_{SIT} > 3; n_{TPC}>1"); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); leg->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); c1->SaveAs("TrackBack_P_TPC.eps" ); c1->SaveAs("TrackBack_P_TPC.gif" ); }